//
//  RTMManager.m
//  RTMKitDemo
//
//  Created by reyzhang on 2021/12/31.
//

#import "RTMManager.h"

//使用静态变量，也可将实例化对象变成单例对象
static YMRTMClient *_client = nil;
static NSString *_current = nil;

@implementation YMRTMManager

+ (void)load {
     _client = [[YMRTMClient alloc] initWithDelegate:nil];
}

+ (YMRTMClient * _Nullable)client {
    return _client; //返回静态的成员变量
}

+ (NSString * _Nullable)current {
    return _current;
}

+ (void)setCurrent:(NSString * _Nonnull)name {
    _current = name;
}


+ (void)updateDelegate:(id <YMRTMClientDelegate> _Nullable)delegate {
    _client.delegate = delegate;
}

@end
